package net.sebpx.subgeste.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import net.sebpx.subgeste.form.Hospital;
import net.sebpx.subgeste.service.HospitalService;

@Controller
public class HospitalController {
	
	@Autowired
	private HospitalService hospitalService;
	
	@RequestMapping("/hospital")
	public String listHospitals(Map<String, Object> map) {

		map.put("hospital", new Hospital());
		map.put("hospitalList", hospitalService.listHospitals());
		return "hospital";
	}	

}
